/* 
 * File:   mapconstantstest.cpp
 * Author: dolphinigle
 *
 * Created on March 12, 2011, 4:12 PM
 */

#include <stdlib.h>
#include "gtest/gtest.h"
#include "mapconstants.h"

TEST(MapConstantsTest, ConsistentFieldSize) {
  int cntnec = 0, cntnpc = 0, cntpc = 0;
  for (int i = 0; i <= 127; ++i) {
    int oknec = MapConstants::isNonEnterableCell((char)i);
    int oknpc = MapConstants::isNonPlantableCell((char)i);
    int okpc  = MapConstants::isPlantableCell((char)i);
    cntnec += oknec;
    cntnpc += oknpc;
    cntpc += okpc;
    EXPECT_LE(oknec + oknpc + okpc, 1);
  }
  EXPECT_EQ(cntnec, 1);
  EXPECT_EQ(cntnpc, 1);
  EXPECT_EQ(cntpc , 1);
}
